<template>
   <div>
       {{data}}
   </div>
</template>

<script>
   export default {
       data () {
       return {
           data: []
       }
   },created(){
    //    console.log(this.$http);
    // this.$http.get('http://127.0.0.1:3000/movieslist')
    // .then(res=>{
    //     this.data = res.bodyText
    // },err=>{
    //     console.log(err)
    // })
    this.$http.post('http://127.0.0.1:3000/search',
                    {key:'大地'},{emulateJSON: true})
                    .then(res=>{
                        console.log(res)
                    },err=>{
                        console.log(err)
                    })

   }
 }
</script>

<style scoped>
    .h{
        height: 100px;
        background-color: darkgoldenrod;
    }
    .b{
        height: 100px;        
        background-color:skyblue;
    }
    .f{
        height: 100px;
        background-color: darkcyan;
    }
</style>
